Skip to content

feat(o11y): self-logs via shared entry-point zap->OTel bridge + OTLP log export (PIPE-1066) - #287

Open
Dylan-M wants to merge 1 commit into
dylanmyers/pipe-1066-self-tracingfrom
dylanmyers/pipe-1066-self-logs
Open

feat(o11y): self-logs via shared entry-point zap->OTel bridge + OTLP log export (PIPE-1066)#287
Dylan-M wants to merge 1 commit into
dylanmyers/pipe-1066-self-tracingfrom
dylanmyers/pipe-1066-self-logs

Conversation

@Dylan-M

@Dylan-M Dylan-M commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Proposed Change

Bridges blitz's own zap logging into an OTel LoggerProvider so internal logs export as
OTLP records, opt-in through telemetry.logs. The logger is bridged once at each process
entry point (main for standalone; config.LoadModules and the embed runner for embed),
and shared from there. A bridged zap logger propagates to the child loggers components
derive, so components do not re-bridge. Also collapses the host's flat provider fields
into the single Host.Telemetry bundle, so one value carries all three signals.

Each setting is exposed on all three config surfaces, like every other blitz option: the
telemetry.logs config block, BLITZ_TELEMETRY_LOGS_* env vars, and --telemetry-logs-*
flags.

How to validate

  • Point blitz at any OTLP gRPC collector (its debug exporter shows the log records). Run:
    go run ./cmd/blitz --generator-type apache-common --generator-apache-common-rate 1s --output-type stdout --telemetry-logs-otlpendpoint localhost:4317 --telemetry-logs-insecure
  • Confirm blitz's own startup and generator log lines arrive at the collector as OTLP
    records. They still print to stdout too.
  • Drop the two --telemetry-logs-* flags and confirm logging stays stdout-only.
  • go test ./embed/ runs TestEmbed_HostBundleReceivesAllThreeSelfSignals, which asserts
    one host bundle receives metrics, spans, and bridged logs together.
  • go test ./internal/config/... covers the flag, env, and default for each new setting.
Checklist
  • Changes are tested
  • CI has passed

…log export (PIPE-1066)

Assisted-by: Claude Opus 4.8
@Dylan-M
Dylan-M force-pushed the dylanmyers/pipe-1066-self-tracing branch from b122971 to cb115bd Compare August 14, 2026 19:22
@Dylan-M
Dylan-M force-pushed the dylanmyers/pipe-1066-self-logs branch from ce7f0a2 to 2a8a759 Compare August 14, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant